# Maintainer: Kyle Keen <keenerd@gmail.com>
# Maintainer: Bruno Pagani <archange@archlinux.org>
# Contributor: Dmitriy Morozov <foxcub>

pkgname=cgal
pkgver=5.6
pkgrel=1
pkgdesc="Computational Geometry Algorithms Library"
arch=(any)
url="https://www.cgal.org"
license=(GPL LGPL)
depends=(boost eigen gmp mpfr)
makedepends=(cmake)
source=(https://github.com/CGAL/cgal/releases/download/v${pkgver}/CGAL-${pkgver}.tar.xz)
# https://github.com/CGAL/cgal/releases/download/v${pkgver}/sha256sum.txt
sha256sums=('dcab9b08a50a06a7cc2cc69a8a12200f8d8f391b9b8013ae476965c10b45161f')

build() {
  cmake -B build -S CGAL-${pkgver} \
    -DCMAKE_INSTALL_PREFIX=/usr
  make -C build
}

package() {
  make -C build DESTDIR="${pkgdir}" install
  rm -r "${pkgdir}"/usr/share
}
